package containers;

import java.util.List;

public class StatisticsContainer {
	private int myNumPagesCrawled;
	private int myAverageWordsPerPage;
	private int myAverageNumURLPerPage;
	private List<KeywordContainer> myKeywords;
	private double myAverageTimePerPage;
	private double myTotalExecutionTime;
	
	public StatisticsContainer(final int numPagesCrawled, final int averageWordsPerPage, 
			final int averageNumURLPerPage, final List<KeywordContainer> keywords,
			final double averageTimePerPage, final double totalExecutionTime) {
		myNumPagesCrawled = numPagesCrawled;
		myAverageWordsPerPage = averageWordsPerPage;
		myAverageNumURLPerPage = averageNumURLPerPage;
		myKeywords = keywords;
		myAverageTimePerPage = averageTimePerPage;
		myTotalExecutionTime = totalExecutionTime;
	}
	
	/**
	 * Returns the total number of pages crawled.
	 * @return The total number of pages crawled as int.
	 */
	public int getNumberTotalPagesCrawled() {
		return myNumPagesCrawled;
	}

	/**
	 * Returns the average number of words per page.
	 * @return the average number of words per page rounded to three decimals as double.
	 */
	public double getMyAverageWordsPerPage() {
		return myAverageWordsPerPage;
	}

	/**
	 * Returns the average number of URL's found per page crawled.
	 * @return The average number of URL's found per page rounded to the nearest integer as int.
	 */
	public int getMyAverageNumURLPerPage() {
		return myAverageNumURLPerPage;
	}
	
	/**
	 * Returns the Keyword Containers for this statistical container.
	 * @return The keyword containers as ArrayList<KeywordContainer>.
	 */
	public List<KeywordContainer> getKeywords() {
		return myKeywords;
	}

	/**
	 * Returns the average time to parse the pages crawled.
	 * @return The average parse time as double.
	 */
	public double getMyAverageTimePerPage() {
		return myAverageTimePerPage;
	}

	/**
	 * Returns the total time to parse the pages crawled.
	 * @return the Total parse time as double.
	 */
	public double getMyTotalExecutionTime() {
		return myTotalExecutionTime;
	}	
}
